package com.hxit.huaxiamelongarden.domin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

/**
 * @ClassName Like
 * @description 点赞实体--对应项目的顶呱呱
 * @Author 12694
 * @Date 2025/1/28 10:43
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("likes")
@Schema(name = "Like", description = "点赞实体类（对应顶呱呱功能）")
public class Like {

    @TableId(type = IdType.AUTO)
    @Schema(description = "点赞记录唯一ID（自增主键）", example = "1")
    private Integer likeId;

    @TableField("content_id")
    @Schema(description = "被点赞的内容ID", example = "202", required = true)
    private Integer contentId;

    @TableField("user_id")
    @Schema(description = "点赞用户的ID", example = "1001", required = true)
    private Integer userId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("created_at")
    @Schema(description = "点赞时间", example = "2025-01-28 10:43:00")
    private Timestamp createdAt;
}
